package com.xhs.controller;

import com.xhs.service.DownloadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;


/**
 * @desc: EasyExcel操作Excel的相关接口
 * @projectName: tools-parent
 * @author: xhs
 * @date: 2023/2/8 13:14
 * @version: JDK 1.8
 */
@Slf4j
@RestController
@RequestMapping("/easyExcel")
public class DownloadController {
    @Resource
    private DownloadService downloadService;

    /**
     * 用户信息表导出
     *
     * @param response response
     */
    @GetMapping("/user")
    public void user(HttpServletResponse response) {
        downloadService.user(response);
    }

    /**
     * 用户信息表导出-合并单元格
     *
     * @param response response
     */
    @GetMapping("/userMerge")
    public void userMerge(HttpServletResponse response) {
        downloadService.userMerge(response);
    }
}
